package com.srti.gbb.entity;
// Generated Apr 15, 2014 4:24:33 PM by Hibernate Tools 3.6.0


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Address generated by hbm2java
 */
@Entity
@Table(name="address", schema="test"
)
public class Address  implements java.io.Serializable {


     private String email;
     private Pi pi;
     private String house;
     private String area;
     private String country;
     private String state;
     private String city;
     private Integer pincode;

    public Address() {
    }

	
    public Address(Pi pi) {
        this.pi = pi;
    }
    public Address(Pi pi, String house, String area, String country, String state, String city, Integer pincode) {
       this.pi = pi;
       this.house = house;
       this.area = area;
       this.country = country;
       this.state = state;
       this.city = city;
       this.pincode = pincode;
    }
   
     @GenericGenerator(name="generator", strategy="foreign", parameters=@Parameter(name="property", value="pi"))
     @Id 
     //@GeneratedValue(generator="generator")

    
    @Column(name="email", unique=true, nullable=false)
    public String getEmail() {
        return this.email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }

@OneToOne(fetch=FetchType.LAZY)@PrimaryKeyJoinColumn
    public Pi getPi() {
        return this.pi;
    }
    
    public void setPi(Pi pi) {
        this.pi = pi;
    }

    
    @Column(name="house")
    public String getHouse() {
        return this.house;
    }
    
    public void setHouse(String house) {
        this.house = house;
    }

    
    @Column(name="area")
    public String getArea() {
        return this.area;
    }
    
    public void setArea(String area) {
        this.area = area;
    }

    
    @Column(name="country")
    public String getCountry() {
        return this.country;
    }
    
    public void setCountry(String country) {
        this.country = country;
    }

    
    @Column(name="state")
    public String getState() {
        return this.state;
    }
    
    public void setState(String state) {
        this.state = state;
    }

    
    @Column(name="city")
    public String getCity() {
        return this.city;
    }
    
    public void setCity(String city) {
        this.city = city;
    }

    
    @Column(name="pincode")
    public Integer getPincode() {
        return this.pincode;
    }
    
    public void setPincode(Integer pincode) {
        this.pincode = pincode;
    }




}


